/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package lcfgly.utils;

/**
 * LTypeUtils
 * @author lcfgly
 * @Date 2015-1-28 9:56:19
 * @version 1.0
 */
public class LTypeUtils {

    /**
     * 判断字符是否为空
     * @param str
     * @return 
     */
    public static boolean stringIsEmpty(String str){
        if(str == null)
            return true;
        str=str.trim();
        return "".equals(str);
    }
    
    /**
     * Object转换成Long
     * @param obj
     * @return 
     */
    public static Long Long(Object obj){
        return Long.valueOf(String.valueOf(obj));
    }
    
    /**
     * Object转换成Double
     * @param obj
     * @return 
     */
    public static Double Double(Object obj){
        return Double.valueOf(String.valueOf(obj));
    }
    
    /**
     * Object转换成Integer
     * @param obj
     * @return 
     */
    public static Integer Integer(Object obj){
        return Integer.valueOf(String.valueOf(obj));
    }
    
}
